package com.hmy.contract.client;

import com.hmy.ccp.common.result.FeignResult;
import com.hmy.ccp.common.result.Results;
import com.hmy.ccp.error.annotations.HmyFeignController;
import com.hmy.contract.bo.request.contract.SupplyContractInfoListRequest;
import com.hmy.contract.bo.response.contract.SupplyContractInfoListResponse;
import com.hmy.contract.service.contract.ISupplyContractService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import javax.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 增补合同管理feign客户端
 * @Author wenjian
 * @Date 2024/03/27
 * @Version 1.0
 */

@Slf4j
@Api(tags = "增补合同管理feign客户端")
@RestController("feignSupplyContractClientController")
@Validated
@HmyFeignController
public class SupplyContractClientController {

    @Resource
    private ISupplyContractService supplyContractService;

    /**
     * 查询增补合同列表
     *
     * @param request
     * @return
     */
    @PostMapping("/feign/supplyContract/supplyContractInfoList")
    @ApiOperation("查询增补合同列表")
    public FeignResult<SupplyContractInfoListResponse> supplyContractInfoList(@RequestBody SupplyContractInfoListRequest request) {
        SupplyContractInfoListResponse response = supplyContractService.supplyContractInfoList(request);
        return Results.newSuccessResult(response);
    }
    

}
